<ui:composition xmlns="http://www.w3.org/1999/xhtml"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:p="http://primefaces.prime.com.tr/ui"
	xmlns:ui="http://java.sun.com/jsf/facelets"
	template="Layout.xhtml">

<ui:define name="metadata">
<f:event listener="#{sessionBean.isLoggedIn}" type="preRenderView" />
</ui:define>

		<ui:define name="content">
			<h:form>
				<p:panel id="panel" header="Profile">
				<p:messages id="msgs"/>
					<h:panelGrid columns="2" columnClasses="column" cellpadding="5">
						<h:outputText value="Vorname: " />
						<p:inputText id="firstname" value="#{sessionBean.user.firstname}"
							required="true" />

						<h:outputText value="Nachname: " />
						<p:inputText id="lastname" value="#{sessionBean.user.lastname}"
							required="true" />

						<h:outputText value="Email: " />
						<p:inputText id="email" value="#{sessionBean.user.email}"
							required="true" />
							
						<h:outputText value="Passwort: " />
						<p:password id="pass1" value="#{sessionBean.user.password}"
							required="true" />
							
						<h:outputText value="Passwort bestätigen: " />
						<p:password id="pass2" value="#{customerProfile.confirmPass}"
							required="true" feedback="false">
                    	</p:password>

						<h:outputText value="Geburtsdatum: " />
						<p:calendar value="#{sessionBean.user.age}" required="true"
							mode="popup" navigator="true" />
					</h:panelGrid>

					<p:commandButton id="btn" value="Save" update="panel"
						actionListener="#{customerProfile.submit}"/>
				</p:panel>
			</h:form>
			
		</ui:define>
</ui:composition>
